﻿using System;

using Fuse8.DomainFramework.Domain;
using Fuse8.DomainFramework.DataAccess;
using Fuse8.DomainFramework.DataAccess.InMemoryDatabase;

namespace Fuse8.DomainFramework.Configuration.Fluent
{
    /// <summary>
    /// 
    /// </summary>
    public class InMemoryDataRepositoryType : IFrameworkDataRepositoryType
    {
        #region IFrameworkDataRepositoryType Members

        /// <summary>
        /// 
        /// </summary>
        /// <typeparam name="TEntity"></typeparam>
        /// <returns></returns>
        public IUnitOfWorkFactory<TEntity> CreateUnitOfWorkFactory<TEntity>() 
            where TEntity : class, IEntityObject, new()
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// 
        /// </summary>
        /// <typeparam name="TEntity"></typeparam>
        /// <typeparam name="TRepository"></typeparam>
        /// <returns></returns>
        public IEntityDataRepositoryMapper<TEntity, TRepository> CreateDataMapper<TEntity, TRepository>()
            where TEntity : class, IEntityObject
            where TRepository : class
        {
            throw new NotImplementedException();
        }

        /// <summary>
        /// 
        /// </summary>
        /// <typeparam name="TEntity"></typeparam>
        /// <typeparam name="TKey"></typeparam>
        /// <returns></returns>
        public IEntityDataRepository<TEntity, TKey> CreateDataRepository<TEntity, TKey>()
            where TEntity : class, IEntityObject<TKey>, new()
            where TKey : IComparable<TKey>, IEquatable<TKey>
        {
            return InMemoryDataRepositoryConfiguration<TEntity, TKey>.CreateRepository();
        }

        #endregion
    }
}
